package br.com.center.loja.ws.dto;

import java.io.Serializable;

import javax.xml.bind.annotation.XmlRootElement;

import br.com.center.loja.model.Product;

@XmlRootElement
public class ProductDTO implements Serializable {

	private static final long serialVersionUID = 1L;

	private Product delegate;

	public ProductDTO(Product delegate) {
		super();
		this.delegate = delegate;
	}

	public ProductDTO() {
		super();
	}

	public Long getCode() {
		return delegate.getCode();
	}

	public void setCode(Long code) {
		delegate.setCode(code);
	}

	public String getName() {
		return delegate.getName();
	}

	public void setName(String name) {
		delegate.setName(name);
	}

	public String getModel() {
		return delegate.getModel();
	}

	public void setModel(String model) {
		delegate.setModel(model);
	}

	public Integer getStock() {
		return delegate.getStock();
	}

	public void setStock(Integer stock) {
		delegate.setStock(stock);
	}

	public Integer getMinStock() {
		return delegate.getMinStock();
	}

	public void setMinStock(Integer minSotck) {
		delegate.setMinStock(minSotck);
	}

	public double getPrice() {
		return delegate.getPrice();
	}

	public void setPrice(double price) {
		delegate.setPrice(price);
	}

	@Override
	public int hashCode() {
		return delegate.hashCode();
	}

	@Override
	public boolean equals(Object obj) {
		if (!(obj instanceof ProductDTO)) {
			return false;
		}

		ProductDTO other = (ProductDTO) obj;
		return delegate.equals(other.delegate);
	}
}
